package CalesRobot;

import battlecode.common.Direction;
import battlecode.common.GameConstants;
import battlecode.common.RobotController;
import battlecode.common.RobotType;

/** The example funcs player is a player meant to demonstrate basic usage of the most common commands.
 * Robots will move around randomly, occasionally mining and writing useless messages.
 * The HQ will spawn soldiers continuously. 
 */
public class RobotPlayer 
{
	public static void run(RobotController rc) {
		while (true) {
			try {
				BOT currentBot=null;
				if (rc.getType() == RobotType.HQ) 
				{
					currentBot=new BOTHeadquarters();
				}
				else if (rc.getType() == RobotType.SOLDIER) 
				{
					currentBot=new BOTSoldier();
					
				}
				
				if(currentBot!=null)
					currentBot.RunBot(rc);
				// End turn
				rc.yield();
			} 
			catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
}
